<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<title>掌上小鑫鑫-五金查询平台</title>
		<meta name="description" content="掌上小鑫鑫(鑫鑫(www.xiaoxx.net)是专门)是专门为五金行业打造的信息化平台，操作简洁，一键式搜索。给客户提供五金类产品信息服务，在小鑫鑫平台上搜索五金产品，查看商家主营信息，一键拨打商家电话订货。为五金采购者提供商家信息对接。包括五金产品供应,五金产品采购,五金企业招商,五金配件等信息,是中国五金采购的必备掌上平台">
		<meta name="keywords" content="五金,小鑫鑫,五金建材,五金批发,五金查询,五金工具,机械设备,日用五金,五金耗材,劳保用品,五金企业,五金采购">
		<link rel="shortcut icon" sizes="16x16" href="./images/weixin/icon.jpg">
		<script src="js/weixin/vue.js"></script>
		<script src="js/weixin/axios.min.js"></script>
		<script src="js/weixin/mui.min.js"></script>
		<link rel="stylesheet" href="css/weixin/mui.min.css">
		<link rel="stylesheet" type="text/css" href="css/weixin/style.css">
		<link rel="stylesheet" href="./css/weixin/zhong.css">
		<script src="./js/weixin/zhong.js"></script>
		<style type="text/css">
			.ewm .tishi01 {
				width: 80%;
			}
		</style>
	</head>

	<body bgcolor="#41a2f1">
		<div id="app" v-show="comPicpath" v-cloak>
			<header class="mui-bar mui-bar-nav putong">
				<h1 class="mui-title" @click="boom()">联系我们</h1>
			</header>
			<div class="lianxiwomen">
				<h1>{{comName}}</h1>
				<p>{{comAddr}}</p>
				<div class="tel">
					<a :href="'tel:'+comPhone">拨打热线</a><span>{{comPhone}}</span></div>
			</div>
			<div class="ewm">
				<div class="tishi01">长按二维码识别，收藏关注我们</div>
				<img id="img" v-cloak :src="PICURL+comPicpath" width="180" height="180">
				<div class="tishi02">关注我们<br />更多行业咨询早知道</div>
			</div>
			<div :class="cxy" @click="cxy = 'none'">
				<div class="fill">
					<div class="reference"></div>
					<div class="clock" id="utility-clock">
						<div class="centre">
							<div class="dynamic"></div>
							<div class="expand round circle-1"></div>
							<div class="anchor hour">
								<div class="element thin-hand"></div>
								<div class="element fat-hand"></div>
							</div>
							<div class="anchor minute">
								<div class="element thin-hand"></div>
								<div class="element fat-hand minute-hand"></div>
							</div>
							<div class="anchor second">
								<div class="element second-hand"></div>
							</div>
							<div class="expand round circle-2"></div>
							<div class="expand round circle-3"></div>
						</div>
					</div>
				</div>
			</div>
			<script type="text/javascript">
				localStorage.clear();
				mui.init({
					gestureConfig: {
						hold: true, //默认为false
					}
				});
				var num = 0;
				var time;
				var app = new Vue({
					el: '#app',
					data: {
						comPicpath: "",
						comName: "",
						comAddr: "",
						comTel: "",
						comPhone: "",
						cxy: 'no'
					},
					methods: {
						boom: function() {
							clearTimeout(time);
							num++;
							if(num === 3) {
								this.cxy = 'block';
								biao();
								num = 0;
							} else {
								time = setTimeout(function() {
									num = 0;
								}, 200)
							}

						},
						get: function() {
							axios.get(URL + 'contactAction!findComp', {})
								.then(function(response) {
									var data = response.data.data[0];
									app.$data.comPicpath = data.comPicpath;
									app.$data.comName = data.comName;
									app.$data.comAddr = data.comAddr;
									app.$data.comPhone = data.comPhone;
								})
								.catch(function(error) {
									console.log(error);
								});
						}
					}
				})
				window.onload = function() {
					app.get();
					document.getElementById("img").addEventListener("hold", function() {
						savePicture();
					});
				}
				// 保存图片到相册中 

				function savePicture() {
					// 创建下载任务
					picurl = "http://www.xiaoxx.net//gypupload/advertimage/20181110/24f0b894-1533-4094-bbf4-d38820c81e8f.jpg";
					//图片保存到手机后的路径
					picname = "_downloads/24f0b894-1533-4094-bbf4-d38820c81e8f.jpg";
					var dtask = plus.downloader.createDownload(picurl, {}, function(d, status) {
						console.log(JSON.stringify(d), status)
						// 下载完成
						if(status == 200) { 
							plus.gallery.save(picname, function() { //保存到相册方法
								mui.toast('已保存到手机相册');
							}, function() {
								mui.toast('保存失败，请重试！');
							});
						} else {}
					});
					dtask.start(); //开始下载
				}
			</script>
		</div>

	</body>

</html>